package com.waitingresult.designpattern.behavioral.template.demo3;

/**
 * @Author: WangShuai
 * @CreateTime: 2023-10-21  11:56
 * @Description: 基础的抽象模板
 * @Version: 1.0
 */
public abstract class AbsInsertTemplate {

    abstract Integer type();

    abstract void method1();

    abstract void method2();

    /**
     * 模板方法, 规定了当前模板的执行顺序
     *
     * @return
     */
    final Boolean doWork() {
        method1();
        method2();
        return true;
    }
}
